﻿using System;
using nRoute.Components.Composition;
using Orktane.ScriptActionModel;

namespace Orktane.Sample.ConsoleApp.ScriptActions
{
    [MapScriptAction("GC", "GC Memory", ShortDescription = "Forces an immediate garbage collection of all generations.",
        Lifetime = InstanceLifetime.PerInstance, UnListed = true)]
    public class GCScriptAction 
        : IScriptAction
    {

#region IScriptAction Members

        public void Execute(Arguments args)
        {
            // need to do this at least twice
            GC.Collect();
            GC.Collect();
        }

#endregion

    }
}
